<template>
  <div>
    <ul v-for="item in list" :key="item.id">

<li>
{{ item.name }}
</li>
<li>
    <img :src="item.picture">
</li>
    </ul>
  </div>
</template>
<script>
import axios from 'axios'

export default {

  data () {
    return {
      list: []
    }
  },
  methods: {},
  components: {},
  computed: {},
  async created () {
    const res = await axios.get('https://hmajax.itheima.net/api/category/top')
    this.list = res.data.data
    console.log(res)
  }
}
</script>
<style lang="less" scoped>

</style>
